package com.example.rmi;

import java.rmi.*;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
public class HelloRMIServer{ 
    public static void main(String[] args) throws Exception { 
        if (System.getSecurityManager() == null) { 
            System.setSecurityManager(new RMISecurityManager()); 
        } 
        Registry reg = LocateRegistry.createRegistry(1099);
        Echo h = new Echoimpl();
        Naming.rebind("rmi://localhost/Test", h); 
        System.out.println("HelloImpl의 객체 h를 김철수이름으로 바인딩");     
    } //end of main 
} //end of HelloRMIServer